
def demo(num,*args,**kwargs):
    print(num);
    print(args);
    print(kwargs);


def sum_numbers(*args):
    num = 0;
    print(args);

    for i in args:
        num += i;
    return num





print("*" * 30 + "拆包");

def demo1(*args,**kwargs):
    """测试学习多值函数"""
    print(args);
    print(kwargs);






if __name__ == '__main__':

    demo(1, 23, 233, name="gaohq", age=18);

    result = sum_numbers(2,3,4);
    print(result);


    my_tuple = (12, 123);
    my_dict = {"name": "gaohq", "age": 32};

    # 这里我门希望 my_tuple  传递给args,my_dict传递个kwargs;
    demo1(*my_tuple, **my_dict);
    # 查看demo1方法有哪些内置的函数。
    print("查看方法的内置函数");
    dir_list = dir(demo1);
    print(dir_list);
    print("查看变量的内置函数");


